import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:flutter_app_open_camera/resource/theme/theme_enum.dart';
import 'package:flutter_app_open_camera/resource/theme/theme_ui.dart';

Map<ColorEnum, Color> getThemeColor(int darkMode) {
  if (darkMode == ThemeEnum.dark.index) {
    colorThemes = {
      //主题色
      ColorEnum.m1: Color(0xFF262626),
      ColorEnum.m2: Color(0xFF484d55),
      ColorEnum.m3: Color(0xFF3a3d43),
      ColorEnum.m4: Color(0xFF303b51),
      ColorEnum.m5: Color(0xFF203a6e),
      ColorEnum.m6: Color(0xFF143f94),
      ColorEnum.m7: Color(0xFF003091),
      ColorEnum.m8: Color(0xFF3263fb),
      ColorEnum.m9: Color(0xFFbebebe),
      ColorEnum.m10: Color(0xFF3f4a5e),
      ColorEnum.m11: Color(0x66ffffff),
      //背景色
      ColorEnum.g1: Color(0xFF262626),
      ColorEnum.g2: Color(0xFF303030),
      ColorEnum.g3: Color(0xFF1f1f1f),
      ColorEnum.g4: Color(0xFF171717),
      ColorEnum.g5: Color(0xFF202020),
      ColorEnum.g6: Color(0xFF121212),
      ColorEnum.g7: Color(0xFF2e2e2e),
      //字体色
      ColorEnum.t1: Color(0xFFffffff),
      ColorEnum.t2: Color(0xFFc6c8d0),
      ColorEnum.t3: Color(0xFF9496a4),
      ColorEnum.t4: Color(0xFF6d747b),
      ColorEnum.t5: Color(0xFF505861),
      ColorEnum.t6: Color(0xFFffffff),
      ColorEnum.t7: Color(0xFF3263fb),
      ColorEnum.t8: Color(0xFF5d82f4),
      ColorEnum.t9: Color(0xFF7b9bff),
      ColorEnum.t10: Color(0xFF9cb4ff),
      ColorEnum.t11: Color(0xFFd2e4ff),
      ColorEnum.t12: Color(0xFFe4ebff),
      ColorEnum.t13: Color(0xFFe6f0ff),
      ColorEnum.t14: Color(0xFF6c6fff),
      ColorEnum.t15: Color(0xFF3d3e80),
      ColorEnum.t16: Color(0xFFff7d7d),
      ColorEnum.t17: Color(0x99ffffff),
      //叠加色
      ColorEnum.f1: Color(0xFFff7f5c),
      ColorEnum.f2: Color(0xFF3263fb),
      ColorEnum.f3: Color(0xFF4cd1d0),
      ColorEnum.f4: Color(0xFFea5c60),
      ColorEnum.f5: Color(0xFF252f3b),
      ColorEnum.f6: Color(0xFF6d747b),
      ColorEnum.f7: Color(0xFFc6c8d0),
      ColorEnum.f8: Color(0xFF262626),
      ColorEnum.f9: Color(0xFF303030),
      ColorEnum.f10: Color(0xFF494949),
      ColorEnum.f11: Color(0xFFffe6db),
      //动效色
      ColorEnum.d1: Color(0xff76cfc3),
      ColorEnum.d2: Color(0xff335652),
      ColorEnum.d3: Color(0xff335652),
      //蒙层色
      ColorEnum.o1: Color(0x99000000),
      ColorEnum.o2: Color(0x66000000),
      ColorEnum.o3: Color(0x33000000),
      ColorEnum.o4: Color(0xff121212),
      ColorEnum.o5: Color(0x80ffffff),
    };
  } else if (darkMode == ThemeEnum.light.index) {
    colorThemes = {
      //主题色
      ColorEnum.m1: Color(0xFFFFFFFF),
      ColorEnum.m2: Color(0xFFE6F0FF),
      ColorEnum.m3: Color(0xFFE4EBFF),
      ColorEnum.m4: Color(0xFFd2e4ff),
      ColorEnum.m5: Color(0xFF9cb4ff),
      ColorEnum.m6: Color(0xFF7b9bff),
      ColorEnum.m7: Color(0xFF5d82f4),
      ColorEnum.m8: Color(0xFF0000ff),
      ColorEnum.m9: Color(0xFFd8d8d8),
      ColorEnum.m10: Color(0xFFedf2ff),
      ColorEnum.m11: Color(0x66ffffff),
      //背景色
      ColorEnum.g1: Color(0xFFffffff),
      ColorEnum.g2: Color(0xFFf7f7f7),
      ColorEnum.g3: Color(0xFF252f3b),
      ColorEnum.g4: Color(0xFF36414D),
      ColorEnum.g5: Color(0xFF1f2832),
      ColorEnum.g6: Color(0xFF11151B),
      ColorEnum.g7: Color(0xFFfafbfc),
      //字体色
      ColorEnum.t1: Color(0xFF252f3b),
      ColorEnum.t2: Color(0xFF505861),
      ColorEnum.t3: Color(0xFF6d747b),
      ColorEnum.t4: Color(0xFF9496a4),
      ColorEnum.t5: Color(0xFFc6c8d0),
      ColorEnum.t6: Color(0xFFffffff),
      ColorEnum.t7: Color(0xFF3263fb),
      ColorEnum.t8: Color(0xFF5d82f4),
      ColorEnum.t9: Color(0xFF7b9bff),
      ColorEnum.t10: Color(0xFF9cb4ff),
      ColorEnum.t11: Color(0xFFd2e4ff),
      ColorEnum.t12: Color(0xFFe4ebff),
      ColorEnum.t13: Color(0xFFe6f0ff),
      ColorEnum.t14: Color(0xFF4749a1),
      ColorEnum.t15: Color(0xFF8283BB),
      ColorEnum.t16: Color(0xFFff7d7d),
      ColorEnum.t17: Color(0xFFff5c46),
      //叠加色
      ColorEnum.f1: Color(0xFFff7f5c),
      ColorEnum.f2: Color(0xFF3263fb),
      ColorEnum.f3: Color(0xFF4cd1d0),
      ColorEnum.f4: Color(0xFFea5c60),
      ColorEnum.f5: Color(0xFF252f3b),
      ColorEnum.f6: Color(0xFF6d747b),
      ColorEnum.f7: Color(0xFFc6c8d0),
      ColorEnum.f8: Color(0xFFffffff),
      ColorEnum.f9: Color(0xFFfafafa),
      ColorEnum.f10: Color(0xFFf0f0f0),
      ColorEnum.f11: Color(0xFFffe6db),
      //动效色
      ColorEnum.d1: Color(0xff76cfc3),
      ColorEnum.d2: Color(0xffeeeeee),
      ColorEnum.d3: Color(0xfff1faf9),
      //蒙层色
      ColorEnum.o1: Color(0x99000000),
      ColorEnum.o2: Color(0x66000000),
      ColorEnum.o3: Color(0x33000000),
      ColorEnum.o4: Color(0xffffffff),
      ColorEnum.o5: Color(0x80ffffff),
    };
  }
  return colorThemes;
}

Color get m1 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m1];
}

Color get m2 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m2];
}

Color get m3 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m3];
}

Color get m4 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m4];
}

Color get m5 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m5];
}

Color get m6 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m6];
}

Color get m7 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m7];
}

Color get m8 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m8];
}

Color get m9 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m9];
}

Color get m10 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m10];
}

Color get m11 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.m11];
}

Color get g1 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.g1];
}

Color get g2 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.g2];
}

Color get g3 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.g3];
}

Color get g4 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.g4];
}

Color get g5 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.g5];
}

Color get g6 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.g6];
}

Color get g7 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.g7];
}

Color get t1 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t1];
}

Color get t2 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t2];
}

Color get t3 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t3];
}

Color get t4 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t4];
}

Color get t5 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t5];
}

Color get t6 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t6];
}

Color get t7 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t7];
}

Color get t8 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t8];
}

Color get t9 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t9];
}

Color get t10 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t10];
}

Color get t11 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t11];
}

Color get t12 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t12];
}

Color get t13 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t13];
}

Color get t14 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t14];
}

Color get t15 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t15];
}

Color get t16 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t16];
}

Color get t17 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.t17];
}

Color get f1 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f1];
}

Color get f2 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f2];
}

Color get f3 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f3];
}

Color get f4 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f4];
}

Color get f5 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f5];
}

Color get f6 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f6];
}

Color get f7 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f7];
}

Color get f8 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f8];
}

Color get f9 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f9];
}

Color get f10 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f10];
}

Color get f11 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.f11];
}

Color get d1 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.d1];
}

Color get d2 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.d2];
}

Color get d3 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.d3];
}

Color get o1 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.o1];
}

Color get o2 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.o2];
}

Color get o3 {
  if (colorThemes == null) {
    return Color(0x33000000);
  }
  return colorThemes[ColorEnum.o3];
}

Color get o4 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.o1];
}

Color get o5 {
  if (colorThemes == null) {
    return Colors.transparent;
  }
  return colorThemes[ColorEnum.o5];
}
